﻿using System.Numerics;
using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;
using Quaternion = UnityEngine.Quaternion;
using Vector3 = UnityEngine.Vector3;

namespace Yoozoo.Gameplay.Liberty.AI.Node
{
    [Category("Ggame/Liberty")]
    public class NpcLookAtPlayer : AIBaseNode
    {
        public BBParameter<bool> support = true;

        protected override void OnExecute()
        {
            _entity.viewer.animationAgent.SetSupportLookAtPlayer(support.value);
            if (support.value)
            {
                _entity.viewer.animationAgent.LookAtIKFadeIn();
            }
            else
            {
                _entity.viewer.animationAgent.LookAtIKFadeOut();
            }
            
            EndAction();
        }
		
    }
}